﻿namespace App_Code.Rules
{
    /// <summary>
    /// Summary description for IsHebDubMovieRule
    /// </summary>
    public class IsHebDubMovieRule : IRule
    {
        public void ApplyRule(PluginDB.PluginVideoInfo pluginVideoInfo)
        {
            if (pluginVideoInfo.IsHebDub) return;
            pluginVideoInfo.IsHebDub = IsHebDub(pluginVideoInfo.VideoName);
        }

        private bool IsHebDub(string videoName)
        {
            return (videoName.Contains("מדובב") || videoName.Contains("דיבוב"));
        }
    }
}